<%
class BlogTrackClass
    public blogId, itemId 
    public trackId, url, title, excerpt, hostName, hostUrl
    public userName, userId, insertTime
    
    public function toArray()
        dim array(11)
        array(0) = blogId
        array(1) = itemId
        array(2) = trackId
        array(3) = url
        array(4) = title
        array(5) = excerpt
        array(6) = hostName
        array(7) = hostUrl
        array(8) = userName
        array(9) = userId
        array(10) = insertTime
        
        toArray = array
    end function
    
    public function build(array)
        build = false
        if isEmpty(array) or not isArray(array) then
            exit function
        end if
        if ubound(array)<11 then
            exit function
        end if    
        
        blogId      = array(0) 
        itemId      = array(1) 
        trackId     = array(2) 
        url         = array(3) 
        title       = array(4) 
        excerpt     = array(5) 
        hostName    = array(6) 
        hostUrl     = array(7) 
        userName    = array(8) 
        userId      = array(9) 
        insertTime  = array(10)
        
        build= true
    
    end function
    
    public function buildFromRS(rs)
        buildFromRS = false
        if isEmpty(rs) or not isObject(rs) then
            exit function
        end if
        if rs.bof or rs.eof then
            exit function
        end if    
        
        trackId     = rs("track_id")

        on error resume next
        
        blogId      = rs("blog_id")
        itemId      = rs("content_id") 
        url         = rs("url")
        title       = rs("title")
        excerpt     = rs("excerpt")
        hostName    = rs("host_name")
        hostUrl     = rs("host_url")
        userName    = rs("user_name")
        userId      = rs("user_id")
        insertTime  = rs("insert_time")
                
        on error goto 0
        
        buildFromRS = true
    end function

end class 
%>